<%@page contentType="text/html"%>
<%@page pageEncoding="UTF-8"%>

<%@taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%> 


<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">

<html>
<head>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
    <title>JSP Page</title>
    
    <script language="JavaScript">
            function setCmd(valor){
                x = document.getElementById("cmd");
                alert (x.value)
                x.value = valor;            
            }
    </script>
</head>
<body bgcolor="#ffffddd">
    
<jsp:include page="../divInclude.jsp" />
<jsp:include page="menu.jsp"/>

<h1 align="center">Lista de Clientes</h1>

<table align="center" width="43%"  cellpadding="2" cellspacing="1" bordercolor="#fff" bgcolor="#EEE8AA">
<tr bgcolor="#EEDD82">
    <th scope="col">Nome/Editar Dados</th>
    <th scope="col">Editar Compra</th>
</tr>

<c:forEach items="${sessionScope.clientes}" var="cli">
<tr style="margin:2px">
    <td width="53%" style="BORDER-BOTTOM: #FFFFFF 2px solid;"><a href="/javabasico/Controlador?cmd=EditarCliente&id=${cli.numero}">${cli.nome}</a></td>
    <td width="20%" style="BORDER-BOTTOM: #FFFFFF 2px solid;"><a href="/javabasico/Controlador?cmd=EditarCompra&id=${cli.numero}">Editar Compra</a></td>
</tr>
    
</c:forEach>
</table>

</body>
</html>
